Skip to content

Add parser errors to make sure we do not generate wrong bytecodes#70

Merged
smarr merged 1 commit intoSOM-st:masterfrom
smarr:add-check-that-arguments-fit-into-uint8_t
Jul 3, 2025
Merged

Add parser errors to make sure we do not generate wrong bytecodes#70
smarr merged 1 commit intoSOM-st:masterfrom
smarr:add-check-that-arguments-fit-into-uint8_t

Conversation

@smarr
Copy link
Copy Markdown
Member

@smarr smarr commented Jul 3, 2025

This PR introduces ParserError() calls to report when code goes over certain limits.
For instance, we can currently only support 256 literal values, because the literal index is encoded as an 8bit number. The same restriction applies for field indexes etc.

@smarr smarr added the bug label Jul 3, 2025
Comment thread src/compiler/BytecodeGenerator.cpp Outdated
Comment thread src/compiler/BytecodeGenerator.cpp Outdated
…rictions

Signed-off-by: Stefan Marr <git@stefan-marr.de>
@smarr smarr force-pushed the add-check-that-arguments-fit-into-uint8_t branch from c2539e9 to 68e80de Compare July 3, 2025 10:00
@smarr smarr merged commit 00c984c into SOM-st:master Jul 3, 2025
19 checks passed
@smarr smarr deleted the add-check-that-arguments-fit-into-uint8_t branch July 3, 2025 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants